<?php

namespace Admin\Mobile\Api;

class Home extends Base
{

    public function login()
    {

        return $this->returnJson([
            'userId' => 1,
            'userName' => '张三',
            'depName' => '产品研发部',
            'portrait' => ''
        ]);
    }

    public function checkUpdate()
    {

    }

    /**
     * @return \Phalcon\Http\Response|\Phalcon\Http\ResponseInterface
     *
     * create by ck 20181119
     *
     * @SWG\Get(
     *     path="/api/v1/home/banner",
     *     tags={"Home"},
     *     summary="获取banner图",
     *     description="",
     *     @SWG\Response(response=200, description="获取列表成功",
     *          @SWG\Schema(
     *              type="array",
     *              @SWG\Items(
     *                  @SWG\Property(property="imgUrl", description="图片地址", type="string"),
     *                  @SWG\Property(property="url", description="跳转地址", type="string"),
     *              ),
     *          )
     *     ),
     *     @SWG\Response(response="400", ref="#/responses/Error"),
     *     @SWG\Response(response="500", ref="#/responses/Error"),
     * )
     */
    public function bannerGet()
    {
        return $this->returnJson([
            ['imgUrl' => '', 'url' => ''],
        ]);
    }

    public function banner()
    {
        return $this->returnJson([
            ['imgUrl' => '', 'url' => ''],
        ]);
    }

    public function notification()
    {
        return $this->returnJson([
            'page' => 1,
            'size' => 50,
            'totalPage' => 2,
            'total' => 75,
            'rows' => [
                [
                    'coverUrl' => '可为空',
                    'title' => '',
                    'time' => '',
                    'url' => '',
                    'readNum' => ''
                ]
            ]
        ]);
    }

    public function information()
    {
        return $this->returnJson([
            'page' => 1,
            'size' => 50,
            'totalPage' => 2,
            'total' => 75,
            'rows' => [
                [
                    'coverUrl' => '可为空',
                    'title' => '',
                    'time' => '',
                    'url' => '',
                    'readNum' => ''
                ]
            ]
        ]);
    }

    public function publicClass()
    {
        return $this->returnJson([
            'page' => 1,
            'size' => 50,
            'totalPage' => 2,
            'total' => 75,
            'rows' => [
                [
                    'coverUrl' => '可为空',
                    'title' => '',
                    'time' => '',
                    'url' => '',
                    'readNum' => ''
                ]
            ]
        ]);
    }
}